#include <QtWidgets/QApplication>

#include "game_main\mainwidget.hpp"
#include "menu_controller\menu_controller.h"
#include "graphic_connector\api\graphic_connector.hpp"
#include "game_controller\headers\game_controller.hpp"

#include "tools\library_loader.hpp"

int main(int argc, char **argv)
{
	QApplication app(argc, argv);
	auto menuController = loadLibrary< MenuController::MenuControllerPlugin > ( "menu_controller", "getMenuControllerPlugin" );
	auto gameController = loadLibrary< GameController::GameControllerPlugin > ( "game_controller", "getGameControllerPlugin" );
	auto graphicConnector = loadLibrary< GraphicConnector::GraphicConnectorPlugin > ( "graphic_connector", "getGraphicConnectorPlugin" );

	MainWidget widget( gameController, graphicConnector );
	gameController->handleUserActivity();

	return app.exec();

}